﻿namespace Microsoft.AspNetCore.Authorization
{
    /// <summary>
    /// 授权扩展操作类
    /// </summary>
    public static class AuthorizationPolicyBuilderExtensions
    {
        /// <summary>
        /// RequireBootstrapAdminAuthorizate 扩展方法
        /// </summary>
        /// <param name="builder">AuthorizationPolicyBuilder 实例</param>
        /// <returns></returns>
        public static AuthorizationPolicyBuilder RequireBootstrapAdminAuthorizate(this AuthorizationPolicyBuilder builder)
        {
            builder.AddRequirements(new BootstrapAdminLicenseRequirement());
            builder.AddRequirements(new BootstrapAdminAppRequirement());
            return builder;
        }
    }
}
